package com.cnunicom.modules.tra.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.cnunicom.common.utils.JsonLongSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 单位表，与单位会员表关联
 *
 * @author dzygod
 * @email dingziyuan0@gmail.com
 * @date 2019-11-27 16:44:19
 */
@Data
@TableName("tra_unit")
public class UnitEntity  implements Serializable{
	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "单位id")
	@TableId(type = IdType.INPUT)
	@ExcelIgnore
	@JsonSerialize(using = JsonLongSerializer.class)
	private Long id;

	@ApiModelProperty(value = "单位名称")
	@ExcelProperty(value = "单位名称", index = 0)
	@ColumnWidth(30)
	@NotBlank(message = "单位名称不能为空")
	private String name;

	@ApiModelProperty(value = "办公室主任姓名")
	@ExcelProperty(value = "办公室主任" ,index =  1)
	@ColumnWidth(30)
	@NotBlank(message = "办公室主任不能为空")
	private String officeChiefName;

	@ApiModelProperty(value = "办公室主任电话")
	@ExcelProperty(value = "主任电话",index = 2)
	@ColumnWidth(30)
	@NotBlank(message = "办公室主任电话不能为空")
	private String officeChiefNum;

	@ApiModelProperty(value = "二维码保存地址")
	@ExcelIgnore
	private String qrCodeUrl;

	@ApiModelProperty(value = "会员总数")
	@ExcelProperty(value = "会员总数", index = 3)
	@ColumnWidth(30)
	private Integer totalMember;

	@ApiModelProperty(value = "创建时间")
	@ExcelIgnore
	private String createTime;

	/**
	 *	逻辑删除
	 */
	@ExcelIgnore
	@TableLogic
	private String isDel;
	/**
	 *
	 */
	@ExcelIgnore
	private String def0;
	/**
	 *
	 */
	@ExcelIgnore
	private String def1;
	/**
	 *
	 */
	@ExcelIgnore
	private String def2;
}
